package com.ruoyi.common.model.farmer.dto.resp;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 商品页面卡片展示 resp
 * @author huixh
 */
public class FarmerProductsCardResp {
    private Long id;
    private String productsName;
    private String mainImage;
    private String status;
    private List<Specification> specifications;
    private List<Sku> skus;
    private List<Image> images;

    // Getter 和 Setter 方法
    public Long getId() {
        return id;
    }


    public void setId(Long id) {
        this.id = id;
    }


    public String getProductsName() {
        return productsName;
    }


    public void setProductsName(String productsName) {
        this.productsName = productsName;
    }


    public String getMainImage() {
        return mainImage;
    }


    public void setMainImage(String mainImage) {
        this.mainImage = mainImage;
    }

    public List<Image> getImages() {
        return images;
    }

    public void setImages(List<Image> images) {
        this.images = images;
    }

    public String getStatus() {
        return status;
    }


    public void setStatus(String status) {
        this.status = status;
    }



    public List<Specification> getSpecifications() {
        return specifications;
    }


    public void setSpecifications(List<Specification> specifications) {
        this.specifications = specifications;
    }


    public List<Sku> getSkus() {
        return skus;
    }


    public void setSkus(List<Sku> skus) {
        this.skus = skus;
    }


    // 内部类：Image
    public static class Image {
        private String url;


        public String getUrl() {
            return url;
        }


        public void setUrl(String url) {
            this.url = url;
        }
    }

    // 内部类：Specification
    public static class Specification {
        private int id;
        private String name;
        private List<String> values;


        public int getId() {
            return id;
        }


        public void setId(int id) {
            this.id = id;
        }


        public String getName() {
            return name;
        }


        public void setName(String name) {
            this.name = name;
        }


        public List<String> getValues() {
            return values;
        }


        public void setValues(List<String> values) {
            this.values = values;
        }
    }


    // 内部类：Sku
    public static class Sku {
        private int id;
        private Specs specs;
        private double price;
        private int stock;
        private String image;


        public int getId() {
            return id;
        }


        public void setId(int id) {
            this.id = id;
        }


        public Specs getSpecs() {
            return specs;
        }


        public void setSpecs(Specs specs) {
            this.specs = specs;
        }


        public double getPrice() {
            return price;
        }


        public void setPrice(double price) {
            this.price = price;
        }


        public int getStock() {
            return stock;
        }


        public void setStock(int stock) {
            this.stock = stock;
        }


        public String getImage() {
            return image;
        }


        public void setImage(String image) {
            this.image = image;
        }


        // 内部类：Specs
        public static class Specs {
            @JsonProperty("规格")
            private String spec;


            public String getSpec() {
                return spec;
            }


            public void setSpec(String spec) {
                this.spec = spec;
            }
        }
    }
}
